let express = require("express")
let app = express()

app.use(function (req, res, next) {
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Headers', 'Content-Type,Content-Length,Authorization,Accept,X-Requested-With,yourHeaderFeild')
    res.header('Access-Control-Allow-Methods', 'PUT,POST,GET,DELETE,OPTIONS')
    next()
})

let chart1 = require("./router/1")
let chart2 = require("./router/2")
let chart3 = require("./router/3")
let chart4 = require("./router/4")
let map = require("./router/map")

app.use("/1", chart1)
app.use("/2", chart2)
app.use("/3", chart3)
app.use("/4", chart4)
app.use("/map", map)

app.listen(8888)
